package com.studyhub.api.problem.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 评论创建DTO
 * 
 * @author StudyHub Team
 */
@Data
@Schema(name = "CommentCreateDTO", description = "评论创建请求")
public class CommentCreateDTO {

    @NotNull(message = "评论目标类型不能为空")
    @Schema(description = "评论目标类型：1-问题，2-回答")
    private Integer targetType;

    @NotNull(message = "评论目标ID不能为空")
    @Schema(description = "评论目标ID")
    private Long targetId;

    @Schema(description = "父评论ID，为NULL表示一级评论")
    private Long parentId;

    @NotBlank(message = "评论内容不能为空")
    @Schema(description = "评论内容")
    private String content;
}
